import Vue from "vue";
import App from "./App";

import Store from "./store";

import { imageUrl } from "./api/url.config";

import NavBar from "./component/nav-bar/nav-bar";
import WhiteSpace from "./component/white-sapce/white-space";
import MyButton from "./component/my-button/my-button";
import MyImg from "./component/my-img/my-img";
import Loading from "./component/loading/loading";
import ModalSuccess from "./component/modal-success/modal-success";

Vue.prototype.$store = Store;
Vue.prototype.$imageUrl = imageUrl;

Vue.config.productionTip = false;

App.mpType = "app";

Vue.component("nav-bar", NavBar);
Vue.component("white-space", WhiteSpace);
Vue.component("my-button", MyButton);
Vue.component("my-img", MyImg);
Vue.component("loading", Loading);
Vue.component("modal-success", ModalSuccess);

if (process.env.NODE_ENV === "development") {
  console.log("开发环境");
} else {
  console.log("生产环境");
}

const app = new Vue({
  ...App
});
app.$mount();
